<%={{ }}=%>
{{#type:void?}}"void"{{/type:void?}}{{!
}}{{#type:string?}}"string"{{/type:string?}}{{!
}}{{#type:binary?}}"binary"{{/type:binary?}}{{!
}}{{#type:bool?}}"bool"{{/type:bool?}}{{!
}}{{#type:byte?}}"byte"{{/type:byte?}}{{!
}}{{#type:i16?}}"i16"{{/type:i16?}}{{!
}}{{#type:i32?}}"i32"{{/type:i32?}}{{!
}}{{#type:i64?}}"i64"{{/type:i64?}}{{!
}}{{#type:double?}}"double"{{/type:double?}}{{!
}}{{#type:float?}}"float"{{/type:float?}}{{!
}}{{#type:struct?}}{
  "type" : "struct",
  "name" : "{{type:name}}"
}{{/type:struct?}}{{!
}}{{#type:enum?}}{
  "type" : "enum",
  "name" : "{{type:name}}"
}{{/type:enum?}}{{!
}}{{#type:sink?}}{
  "type" : "sink",
{{#type:sink_elem_type}}
  "inner_type" : {{> Types}},
{{/type:sink_elem_type}}
{{#type:sink_has_first_response?}}
{{#type:sink_first_response_type}}
  "first_response_type" : {{> Types}},
{{/type:sink_first_response_type}}
{{/type:sink_has_first_response?}}
{{#type:sink_final_response_type}}
  "final_response_type" : {{> Types}}
{{/type:sink_final_response_type}}
}{{/type:sink?}}{{!
}}{{#type:streamresponse?}}{
  "type" : "streamresponse",
{{#type:stream_elem_type}}
  "inner_type" : {{> Types}}{{!
}}{{/type:stream_elem_type}}{{!
}}{{#type:stream_has_first_response?}},
{{#type:stream_first_response_type}}
  "first_response_type" : {{> Types}}
{{/type:stream_first_response_type}}
{{/type:stream_has_first_response?}}
{{^type:stream_has_first_response?}}

{{/type:stream_has_first_response?}}
}{{/type:streamresponse?}}{{!
}}{{#type:service?}}{
  "type" : "service",
  "name" : "{{type:name}}"
}{{/type:service?}}{{!
}}{{#type:list?}}{
  "type" : "list",
{{#type:list_elem_type}}
  "inner_type" : {{> Types}}
{{/type:list_elem_type}}
}{{/type:list?}}{{!
}}{{#type:set?}}{
  "type" : "set",
{{#type:set_elem_type}}
  "inner_type" : {{> Types}}
{{/type:set_elem_type}}
}{{/type:set?}}{{!
}}{{#type:map?}}{
  "type" : "map",
{{#type:key_type}}
  "key_type" : {{> Types}},
{{/type:key_type}}
{{#type:value_type}}
  "value_type" : {{> Types}}
{{/type:value_type}}
}{{/type:map?}}
